 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

京东云DDoS防护包相关接口
京东云DDoS防护包相关接口

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKAntipro/AntiproExecutor.h>

@implementation AntiproClient

@synthesize userAgent = _userAgent;
@synthesize serviceName = _serviceName;
@synthesize version = _version;

-(void) addCustomerHeaderWithKey:(NSString*) key
                           value:(NSString*) value{
    if(![self customHeader])
    {
        self.customHeader = [[NSMutableDictionary alloc] init];
    }
    if(key && value)
    {
        [[self customHeader] setValue:value forKey:key];
    }
   
}

-(id)initWithGlobalConfig{
    if(![GlobalConfig credential])
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@"GlobalConfig credential not config" userInfo:nil];
        @throw e;
    }
    self.credential = [GlobalConfig credential];
    if(![GlobalConfig sdkEnvironment])
    {
        self.sdkEnvironment = [[SDKEnvironment alloc] initWithEndPoint:@"antipro.jdcloud-api.com"];
    }else
    {
        self.sdkEnvironment = [GlobalConfig sdkEnvironment];
    }
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 antipro  v1";
    _serviceName = @"antipro";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}

-(id)initWithCredential:(Credential*)credential
         sdkEnvironment:(SDKEnvironment*)sdkEnvironment
{
    if(!credential)
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@" credential can not null" userInfo:nil];
        @throw e;
    }else{
        self.credential = credential;
    }
    
    if(!sdkEnvironment)
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@" sdkEnvironment can not null" userInfo:nil];
        @throw e;
    }else{
        self.sdkEnvironment = sdkEnvironment;
    }
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 antipro  v1";
    _serviceName = @"antipro";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}

-(id)initWithCredential:(Credential*)credential
{
    if(!credential)
    {
        NSException *e = [SDKArgumentNullException exceptionWithName:@"ArgumentNullException" reason:@" credential can not null" userInfo:nil];
        @throw e;
    }else{
        self.credential = credential;
    }
    if(![GlobalConfig sdkEnvironment])
    {
        self.sdkEnvironment = [[SDKEnvironment alloc] initWithEndPoint:@"antipro.jdcloud-api.com"];
    }else
    {
        self.sdkEnvironment = [GlobalConfig sdkEnvironment];
    }
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 antipro  v1";
    _serviceName = @"antipro";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}

-(id)init{
    self.httpRequestProtocol = @"https";
    _userAgent = @"JdCloudOCSdk 0.0.1 antipro  v1";
    _serviceName = @"antipro";
    _version = @"v1";
    self.contentType = @"application/json";
    return self;
}


/**
createInstance sync request
@param createInstanceRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `createInstanceResponse` the request response data model
*/
-(NSDictionary*) createInstanceSyncWithRequest:(AntiproCreateInstanceRequest*) createInstanceRequest
{
AntiproCreateInstanceExecutor* excutor = [[AntiproCreateInstanceExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:createInstanceRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproCreateInstanceResponse* response = [[AntiproCreateInstanceResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"createInstanceResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)createInstanceAsyncWithRequest:(AntiproCreateInstanceRequest*) createInstanceRequest
                       completionHandler:(void(^)(int statusCode,AntiproCreateInstanceResponse* _Nullable createInstanceResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproCreateInstanceExecutor* excutor = [[AntiproCreateInstanceExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:createInstanceRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproCreateInstanceResponse* response = [[AntiproCreateInstanceResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeCcsIpResources sync request
@param describeCcsIpResourcesRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeCcsIpResourcesResponse` the request response data model
*/
-(NSDictionary*) describeCcsIpResourcesSyncWithRequest:(AntiproDescribeCcsIpResourcesRequest*) describeCcsIpResourcesRequest
{
AntiproDescribeCcsIpResourcesExecutor* excutor = [[AntiproDescribeCcsIpResourcesExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeCcsIpResourcesRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeCcsIpResourcesResponse* response = [[AntiproDescribeCcsIpResourcesResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeCcsIpResourcesResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeCcsIpResourcesAsyncWithRequest:(AntiproDescribeCcsIpResourcesRequest*) describeCcsIpResourcesRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeCcsIpResourcesResponse* _Nullable describeCcsIpResourcesResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeCcsIpResourcesExecutor* excutor = [[AntiproDescribeCcsIpResourcesExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeCcsIpResourcesRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeCcsIpResourcesResponse* response = [[AntiproDescribeCcsIpResourcesResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
deleteProtectedIp sync request
@param deleteProtectedIpRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `deleteProtectedIpResponse` the request response data model
*/
-(NSDictionary*) deleteProtectedIpSyncWithRequest:(AntiproDeleteProtectedIpRequest*) deleteProtectedIpRequest
{
AntiproDeleteProtectedIpExecutor* excutor = [[AntiproDeleteProtectedIpExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:deleteProtectedIpRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDeleteProtectedIpResponse* response = [[AntiproDeleteProtectedIpResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"deleteProtectedIpResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)deleteProtectedIpAsyncWithRequest:(AntiproDeleteProtectedIpRequest*) deleteProtectedIpRequest
                       completionHandler:(void(^)(int statusCode,AntiproDeleteProtectedIpResponse* _Nullable deleteProtectedIpResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDeleteProtectedIpExecutor* excutor = [[AntiproDeleteProtectedIpExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:deleteProtectedIpRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDeleteProtectedIpResponse* response = [[AntiproDeleteProtectedIpResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeInstance sync request
@param describeInstanceRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeInstanceResponse` the request response data model
*/
-(NSDictionary*) describeInstanceSyncWithRequest:(AntiproDescribeInstanceRequest*) describeInstanceRequest
{
AntiproDescribeInstanceExecutor* excutor = [[AntiproDescribeInstanceExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeInstanceRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeInstanceResponse* response = [[AntiproDescribeInstanceResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeInstanceResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeInstanceAsyncWithRequest:(AntiproDescribeInstanceRequest*) describeInstanceRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeInstanceResponse* _Nullable describeInstanceResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeInstanceExecutor* excutor = [[AntiproDescribeInstanceExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeInstanceRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeInstanceResponse* response = [[AntiproDescribeInstanceResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
addProtectedIp sync request
@param addProtectedIpRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `addProtectedIpResponse` the request response data model
*/
-(NSDictionary*) addProtectedIpSyncWithRequest:(AntiproAddProtectedIpRequest*) addProtectedIpRequest
{
AntiproAddProtectedIpExecutor* excutor = [[AntiproAddProtectedIpExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:addProtectedIpRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproAddProtectedIpResponse* response = [[AntiproAddProtectedIpResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"addProtectedIpResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)addProtectedIpAsyncWithRequest:(AntiproAddProtectedIpRequest*) addProtectedIpRequest
                       completionHandler:(void(^)(int statusCode,AntiproAddProtectedIpResponse* _Nullable addProtectedIpResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproAddProtectedIpExecutor* excutor = [[AntiproAddProtectedIpExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:addProtectedIpRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproAddProtectedIpResponse* response = [[AntiproAddProtectedIpResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeIpMonitorFlow sync request
@param describeIpMonitorFlowRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeIpMonitorFlowResponse` the request response data model
*/
-(NSDictionary*) describeIpMonitorFlowSyncWithRequest:(AntiproDescribeIpMonitorFlowRequest*) describeIpMonitorFlowRequest
{
AntiproDescribeIpMonitorFlowExecutor* excutor = [[AntiproDescribeIpMonitorFlowExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeIpMonitorFlowRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeIpMonitorFlowResponse* response = [[AntiproDescribeIpMonitorFlowResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeIpMonitorFlowResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeIpMonitorFlowAsyncWithRequest:(AntiproDescribeIpMonitorFlowRequest*) describeIpMonitorFlowRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeIpMonitorFlowResponse* _Nullable describeIpMonitorFlowResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeIpMonitorFlowExecutor* excutor = [[AntiproDescribeIpMonitorFlowExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeIpMonitorFlowRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeIpMonitorFlowResponse* response = [[AntiproDescribeIpMonitorFlowResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeCpsIpResources sync request
@param describeCpsIpResourcesRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeCpsIpResourcesResponse` the request response data model
*/
-(NSDictionary*) describeCpsIpResourcesSyncWithRequest:(AntiproDescribeCpsIpResourcesRequest*) describeCpsIpResourcesRequest
{
AntiproDescribeCpsIpResourcesExecutor* excutor = [[AntiproDescribeCpsIpResourcesExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeCpsIpResourcesRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeCpsIpResourcesResponse* response = [[AntiproDescribeCpsIpResourcesResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeCpsIpResourcesResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeCpsIpResourcesAsyncWithRequest:(AntiproDescribeCpsIpResourcesRequest*) describeCpsIpResourcesRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeCpsIpResourcesResponse* _Nullable describeCpsIpResourcesResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeCpsIpResourcesExecutor* excutor = [[AntiproDescribeCpsIpResourcesExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeCpsIpResourcesRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeCpsIpResourcesResponse* response = [[AntiproDescribeCpsIpResourcesResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeGeoAreas sync request
@param describeGeoAreasRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeGeoAreasResponse` the request response data model
*/
-(NSDictionary*) describeGeoAreasSyncWithRequest:(AntiproDescribeGeoAreasRequest*) describeGeoAreasRequest
{
AntiproDescribeGeoAreasExecutor* excutor = [[AntiproDescribeGeoAreasExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeGeoAreasRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeGeoAreasResponse* response = [[AntiproDescribeGeoAreasResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeGeoAreasResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeGeoAreasAsyncWithRequest:(AntiproDescribeGeoAreasRequest*) describeGeoAreasRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeGeoAreasResponse* _Nullable describeGeoAreasResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeGeoAreasExecutor* excutor = [[AntiproDescribeGeoAreasExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeGeoAreasRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeGeoAreasResponse* response = [[AntiproDescribeGeoAreasResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeAttackStatistics sync request
@param describeAttackStatisticsRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeAttackStatisticsResponse` the request response data model
*/
-(NSDictionary*) describeAttackStatisticsSyncWithRequest:(AntiproDescribeAttackStatisticsRequest*) describeAttackStatisticsRequest
{
AntiproDescribeAttackStatisticsExecutor* excutor = [[AntiproDescribeAttackStatisticsExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeAttackStatisticsRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeAttackStatisticsResponse* response = [[AntiproDescribeAttackStatisticsResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeAttackStatisticsResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeAttackStatisticsAsyncWithRequest:(AntiproDescribeAttackStatisticsRequest*) describeAttackStatisticsRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeAttackStatisticsResponse* _Nullable describeAttackStatisticsResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeAttackStatisticsExecutor* excutor = [[AntiproDescribeAttackStatisticsExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeAttackStatisticsRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeAttackStatisticsResponse* response = [[AntiproDescribeAttackStatisticsResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeAttackSource sync request
@param describeAttackSourceRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeAttackSourceResponse` the request response data model
*/
-(NSDictionary*) describeAttackSourceSyncWithRequest:(AntiproDescribeAttackSourceRequest*) describeAttackSourceRequest
{
AntiproDescribeAttackSourceExecutor* excutor = [[AntiproDescribeAttackSourceExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeAttackSourceRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeAttackSourceResponse* response = [[AntiproDescribeAttackSourceResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeAttackSourceResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeAttackSourceAsyncWithRequest:(AntiproDescribeAttackSourceRequest*) describeAttackSourceRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeAttackSourceResponse* _Nullable describeAttackSourceResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeAttackSourceExecutor* excutor = [[AntiproDescribeAttackSourceExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeAttackSourceRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeAttackSourceResponse* response = [[AntiproDescribeAttackSourceResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
modifyInstance sync request
@param modifyInstanceRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `modifyInstanceResponse` the request response data model
*/
-(NSDictionary*) modifyInstanceSyncWithRequest:(AntiproModifyInstanceRequest*) modifyInstanceRequest
{
AntiproModifyInstanceExecutor* excutor = [[AntiproModifyInstanceExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:modifyInstanceRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproModifyInstanceResponse* response = [[AntiproModifyInstanceResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"modifyInstanceResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)modifyInstanceAsyncWithRequest:(AntiproModifyInstanceRequest*) modifyInstanceRequest
                       completionHandler:(void(^)(int statusCode,AntiproModifyInstanceResponse* _Nullable modifyInstanceResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproModifyInstanceExecutor* excutor = [[AntiproModifyInstanceExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:modifyInstanceRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproModifyInstanceResponse* response = [[AntiproModifyInstanceResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeProtectionOutline sync request
@param describeProtectionOutlineRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeProtectionOutlineResponse` the request response data model
*/
-(NSDictionary*) describeProtectionOutlineSyncWithRequest:(AntiproDescribeProtectionOutlineRequest*) describeProtectionOutlineRequest
{
AntiproDescribeProtectionOutlineExecutor* excutor = [[AntiproDescribeProtectionOutlineExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeProtectionOutlineRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeProtectionOutlineResponse* response = [[AntiproDescribeProtectionOutlineResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeProtectionOutlineResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeProtectionOutlineAsyncWithRequest:(AntiproDescribeProtectionOutlineRequest*) describeProtectionOutlineRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeProtectionOutlineResponse* _Nullable describeProtectionOutlineResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeProtectionOutlineExecutor* excutor = [[AntiproDescribeProtectionOutlineExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeProtectionOutlineRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeProtectionOutlineResponse* response = [[AntiproDescribeProtectionOutlineResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeProtectionRule sync request
@param describeProtectionRuleRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeProtectionRuleResponse` the request response data model
*/
-(NSDictionary*) describeProtectionRuleSyncWithRequest:(AntiproDescribeProtectionRuleRequest*) describeProtectionRuleRequest
{
AntiproDescribeProtectionRuleExecutor* excutor = [[AntiproDescribeProtectionRuleExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeProtectionRuleRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeProtectionRuleResponse* response = [[AntiproDescribeProtectionRuleResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeProtectionRuleResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeProtectionRuleAsyncWithRequest:(AntiproDescribeProtectionRuleRequest*) describeProtectionRuleRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeProtectionRuleResponse* _Nullable describeProtectionRuleResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeProtectionRuleExecutor* excutor = [[AntiproDescribeProtectionRuleExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeProtectionRuleRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeProtectionRuleResponse* response = [[AntiproDescribeProtectionRuleResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
modifyInstanceName sync request
@param modifyInstanceNameRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `modifyInstanceNameResponse` the request response data model
*/
-(NSDictionary*) modifyInstanceNameSyncWithRequest:(AntiproModifyInstanceNameRequest*) modifyInstanceNameRequest
{
AntiproModifyInstanceNameExecutor* excutor = [[AntiproModifyInstanceNameExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:modifyInstanceNameRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproModifyInstanceNameResponse* response = [[AntiproModifyInstanceNameResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"modifyInstanceNameResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)modifyInstanceNameAsyncWithRequest:(AntiproModifyInstanceNameRequest*) modifyInstanceNameRequest
                       completionHandler:(void(^)(int statusCode,AntiproModifyInstanceNameResponse* _Nullable modifyInstanceNameResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproModifyInstanceNameExecutor* excutor = [[AntiproModifyInstanceNameExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:modifyInstanceNameRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproModifyInstanceNameResponse* response = [[AntiproModifyInstanceNameResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeProtectedIpList sync request
@param describeProtectedIpListRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeProtectedIpListResponse` the request response data model
*/
-(NSDictionary*) describeProtectedIpListSyncWithRequest:(AntiproDescribeProtectedIpListRequest*) describeProtectedIpListRequest
{
AntiproDescribeProtectedIpListExecutor* excutor = [[AntiproDescribeProtectedIpListExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeProtectedIpListRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeProtectedIpListResponse* response = [[AntiproDescribeProtectedIpListResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeProtectedIpListResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeProtectedIpListAsyncWithRequest:(AntiproDescribeProtectedIpListRequest*) describeProtectedIpListRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeProtectedIpListResponse* _Nullable describeProtectedIpListResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeProtectedIpListExecutor* excutor = [[AntiproDescribeProtectedIpListExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeProtectedIpListRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeProtectedIpListResponse* response = [[AntiproDescribeProtectedIpListResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeInstances sync request
@param describeInstancesRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeInstancesResponse` the request response data model
*/
-(NSDictionary*) describeInstancesSyncWithRequest:(AntiproDescribeInstancesRequest*) describeInstancesRequest
{
AntiproDescribeInstancesExecutor* excutor = [[AntiproDescribeInstancesExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeInstancesRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeInstancesResponse* response = [[AntiproDescribeInstancesResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeInstancesResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeInstancesAsyncWithRequest:(AntiproDescribeInstancesRequest*) describeInstancesRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeInstancesResponse* _Nullable describeInstancesResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeInstancesExecutor* excutor = [[AntiproDescribeInstancesExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeInstancesRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeInstancesResponse* response = [[AntiproDescribeInstancesResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeAttackLogs sync request
@param describeAttackLogsRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeAttackLogsResponse` the request response data model
*/
-(NSDictionary*) describeAttackLogsSyncWithRequest:(AntiproDescribeAttackLogsRequest*) describeAttackLogsRequest
{
AntiproDescribeAttackLogsExecutor* excutor = [[AntiproDescribeAttackLogsExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeAttackLogsRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeAttackLogsResponse* response = [[AntiproDescribeAttackLogsResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeAttackLogsResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeAttackLogsAsyncWithRequest:(AntiproDescribeAttackLogsRequest*) describeAttackLogsRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeAttackLogsResponse* _Nullable describeAttackLogsResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeAttackLogsExecutor* excutor = [[AntiproDescribeAttackLogsExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeAttackLogsRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeAttackLogsResponse* response = [[AntiproDescribeAttackLogsResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
checkInstanceName sync request
@param checkInstanceNameRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `checkInstanceNameResponse` the request response data model
*/
-(NSDictionary*) checkInstanceNameSyncWithRequest:(AntiproCheckInstanceNameRequest*) checkInstanceNameRequest
{
AntiproCheckInstanceNameExecutor* excutor = [[AntiproCheckInstanceNameExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:checkInstanceNameRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproCheckInstanceNameResponse* response = [[AntiproCheckInstanceNameResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"checkInstanceNameResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)checkInstanceNameAsyncWithRequest:(AntiproCheckInstanceNameRequest*) checkInstanceNameRequest
                       completionHandler:(void(^)(int statusCode,AntiproCheckInstanceNameResponse* _Nullable checkInstanceNameResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproCheckInstanceNameExecutor* excutor = [[AntiproCheckInstanceNameExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:checkInstanceNameRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproCheckInstanceNameResponse* response = [[AntiproCheckInstanceNameResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeAttackTypeCount sync request
@param describeAttackTypeCountRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeAttackTypeCountResponse` the request response data model
*/
-(NSDictionary*) describeAttackTypeCountSyncWithRequest:(AntiproDescribeAttackTypeCountRequest*) describeAttackTypeCountRequest
{
AntiproDescribeAttackTypeCountExecutor* excutor = [[AntiproDescribeAttackTypeCountExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeAttackTypeCountRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeAttackTypeCountResponse* response = [[AntiproDescribeAttackTypeCountResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeAttackTypeCountResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeAttackTypeCountAsyncWithRequest:(AntiproDescribeAttackTypeCountRequest*) describeAttackTypeCountRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeAttackTypeCountResponse* _Nullable describeAttackTypeCountResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeAttackTypeCountExecutor* excutor = [[AntiproDescribeAttackTypeCountExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeAttackTypeCountRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeAttackTypeCountResponse* response = [[AntiproDescribeAttackTypeCountResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
modifyProtectionRule sync request
@param modifyProtectionRuleRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `modifyProtectionRuleResponse` the request response data model
*/
-(NSDictionary*) modifyProtectionRuleSyncWithRequest:(AntiproModifyProtectionRuleRequest*) modifyProtectionRuleRequest
{
AntiproModifyProtectionRuleExecutor* excutor = [[AntiproModifyProtectionRuleExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:modifyProtectionRuleRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproModifyProtectionRuleResponse* response = [[AntiproModifyProtectionRuleResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"modifyProtectionRuleResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)modifyProtectionRuleAsyncWithRequest:(AntiproModifyProtectionRuleRequest*) modifyProtectionRuleRequest
                       completionHandler:(void(^)(int statusCode,AntiproModifyProtectionRuleResponse* _Nullable modifyProtectionRuleResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproModifyProtectionRuleExecutor* excutor = [[AntiproModifyProtectionRuleExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:modifyProtectionRuleRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproModifyProtectionRuleResponse* response = [[AntiproModifyProtectionRuleResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeElasticIpResources sync request
@param describeElasticIpResourcesRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeElasticIpResourcesResponse` the request response data model
*/
-(NSDictionary*) describeElasticIpResourcesSyncWithRequest:(AntiproDescribeElasticIpResourcesRequest*) describeElasticIpResourcesRequest
{
AntiproDescribeElasticIpResourcesExecutor* excutor = [[AntiproDescribeElasticIpResourcesExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeElasticIpResourcesRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeElasticIpResourcesResponse* response = [[AntiproDescribeElasticIpResourcesResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeElasticIpResourcesResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeElasticIpResourcesAsyncWithRequest:(AntiproDescribeElasticIpResourcesRequest*) describeElasticIpResourcesRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeElasticIpResourcesResponse* _Nullable describeElasticIpResourcesResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeElasticIpResourcesExecutor* excutor = [[AntiproDescribeElasticIpResourcesExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeElasticIpResourcesRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeElasticIpResourcesResponse* response = [[AntiproDescribeElasticIpResourcesResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}

/**
describeOperationRecords sync request
@param describeOperationRecordsRequest request param
@return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `describeOperationRecordsResponse` the request response data model
*/
-(NSDictionary*) describeOperationRecordsSyncWithRequest:(AntiproDescribeOperationRecordsRequest*) describeOperationRecordsRequest
{
AntiproDescribeOperationRecordsExecutor* excutor = [[AntiproDescribeOperationRecordsExecutor alloc] initWithJDCloudClient:self];
    NSDictionary* responseResult = [excutor executeSync:describeOperationRecordsRequest];
    if(responseResult)
    {
        NSData * resultData = [[responseResult objectForKey:@"dataResult"] copy];
        if(resultData)
        {
            NSMutableDictionary* result = [[NSMutableDictionary alloc]initWithDictionary:responseResult];
            
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeOperationRecordsResponse* response = [[AntiproDescribeOperationRecordsResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        [result setValue:response forKey:@"describeOperationRecordsResponse"];
                        return result;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
    }
    return responseResult;
}


-(void)describeOperationRecordsAsyncWithRequest:(AntiproDescribeOperationRecordsRequest*) describeOperationRecordsRequest
                       completionHandler:(void(^)(int statusCode,AntiproDescribeOperationRecordsResponse* _Nullable describeOperationRecordsResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
AntiproDescribeOperationRecordsExecutor* excutor = [[AntiproDescribeOperationRecordsExecutor alloc] initWithJDCloudClient:self];
    [excutor executeAsync:describeOperationRecordsRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        if(!error&&responseData)
        {
            NSData * resultData = [responseData copy];
            NSError *jsonError;
            NSDictionary* allKeys = [NSJSONSerialization JSONObjectWithData:resultData options:0 error:&jsonError];
            if(!jsonError&& allKeys)
            {
                @try {
                    AntiproDescribeOperationRecordsResponse* response = [[AntiproDescribeOperationRecordsResponse alloc]initWithDic:allKeys];
                    if(response)
                    {
                        completionHandler(statusCode,response,responseData,error);
                        return;
                    }
                } @catch (NSException *exception) {
                    if([GlobalConfig isDebug]){
                        NSLog(@"json serialize response data error,info is %@",exception.reason);
                    }
                }
            }
        }
        completionHandler(statusCode,nil,responseData,error);
    }];
}


 /**
 antipro common sync request
 @param  jdcloudDataRequest request param
 @return key `statusCode` http request status code type is int
             `dataResult` the http request response data  type is NSData
             `requestError` the request error type is NSError
 */
 -(NSDictionary*) antiproCommonSyncWithRequest:(JDCloudDataRequest*) jdcloudDataRequest
                                                   url:(NSString*) url
                                                method:(NSString*) method{
    CommonExecutor* excutor = [[CommonExecutor alloc] initWithJDCloudClient:self url:url method:method];
    NSDictionary* responseResult = [excutor executeDataSync:jdcloudDataRequest];
    return responseResult;
}

-(void)antiproCommonAsyncWithRequest:(JDCloudDataRequest*) jdcloudDataRequest
                                         url:(NSString*) url
                                      method:(NSString*) method
                           completionHandler:(void(^)(int statusCode, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler
{
     CommonExecutor* excutor = [[CommonExecutor alloc] initWithJDCloudClient:self url:url method:method];
    
    [excutor executeDataAsync:jdcloudDataRequest completionHandler:^(int statusCode, NSData * _Nullable responseData, NSError * _Nullable error) {
        completionHandler(statusCode,responseData,error);
    }];
} 

@end
